/**
 * 
 */
(function() {
    'use strict';

    angular
        .module('milkbeeApp')
        .controller('MyProfileController', MyProfileController);

    MyProfileController.$inject = ['$scope', '$rootScope','$state','MyProfile',  'previousState', 'entity'];

    function MyProfileController ($scope, $rootScope, $state, MyProfile, previousState, entity ) {
    	
    	var vm = this;
        vm.leaguer = entity;
        vm.previousState = previousState.name;
        var unsubscribe = $rootScope.$on('milkbeeApp:leaguerUpdate', function(event, result) {
            vm.leaguer = result;
        });
        $scope.$on('$destroy', unsubscribe);

  

    }
})();
